﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;

namespace BookShop.DTO
{
    public class Book
    {
        public long Id { get; set; }
        public string Title { get; set; }
        public int CategoryId { get; set; }
        public int AuthorId { get; set; }
        public int PublisherId { get; set; }
        public string Description { get; set; }
        public string Size { get; set; }
        public int? PageNumber { get; set; }
        public DateTime? PublishDate { get; set; }
        public double? AverageRatePoint { get; set; }
        public string PictureUrl { get; set; }
        public double Price { get; set; }
        public DateTime CreateTime { get; set; }
        public DateTime UpdateTime { get; set; }
        public int Quantity { get; set; }
        public int Status { get; set; }

        [NotMapped]
        public string AuthorName { get; set; }
        [NotMapped]
        public string CategoryName { get; set; }
        [NotMapped]
        public string PublisherName { get; set; }
        [NotMapped]
        public bool IsNew { get; set; }
        [NotMapped]
        public bool IsOnSale { get; set; }
        [NotMapped]
        public bool InStock { get; set; }
        [NotMapped]
        public List<RateComment> RateComments { get; set; }
        [NotMapped]
        public double DiscountPrice { get; set; }
    }
}
